//Extencion de dato para uart

module Extencion(in,d_ready,out);
  input [7:0]in;
  input d_ready;
  output reg[31:0]out;
  
  always @(*)
  begin
    if (d_ready)
      begin
        if ((in == 8'b0010_1011) | (in == 8'b0010_1101))
          out = {32'b0,in[7:0]};
        else
          out = {32'b0,in[3:0]};
        end
    else
      out = 32'b11111111_11111111_11111111_11111111;
    end
  endmodule
  
